package day01.file;

import java.io.File;
import java.io.IOException;

/**
 * @ClassName test
 * @Description TODO
 * @Author 16433
 * @Date 2023/3/6 15:38
 * @Version 1.0
 *
 * 在当前目录下创建100个文件,名字为test1-test100
 **/
public class Test1 {
    public static void main(String[] args) throws IOException {
        for (int i = 1; i <= 100; i++) {
            File file = new File("./test"+i+".txt");
            if(!file.exists()){
                file.createNewFile();
            }
        }
        System.out.println("该文件已创建");
    }
}
